package org.example.ui;

import javax.swing.*;
import java.awt.*;

public class MainBox extends JFrame {

    public MainBox() {
        /**
         * ImageIcon icon = new ImageIcon("/Users/gooking/javaprojects/chromeTools/src/main/resources/logo.jpg");
         * //        int a = ImageIO.read(Main.class.getResourceAsStream("logo.jpg")).getWidth();
         * //        System.out.println(a);
         *
         *
         * jf.setIconImage(icon.getImage());
         *
         * //        Toolkit t=jf.getToolkit();
         * //        Image topicon=t.getImage("/Users/gooking/git/apifactory-user-admin/public/favicon.ico");
         * //        jf.setIconImage(topicon);
         *
         */
        this.setTitle ("问卷小工具");
        this.setSize (800, 800);
        this.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
        // 设置布局 - 流式
        this.setLayout (new FlowLayout());
        this.addWindowListener(new WindowNotifier());
    }
}
